﻿@{
	Layout = "~/Views/Shared/_Layout.cshtml";
}

@model IEnumerable<dPet.Application.DataObjects.ServiceSKUPropertyDto>

<div>
	<div class="page-header">
		<h3>服务SKU属性管理</h3>
	</div>

	<div class="panel panel-default">
		<div class="panel-heading">
			<a href="@Url.Action("SKUProperty", "Service")" class="btn btn-info btn-sm" target="_self" title="添加SKU属性"><span class="glyphicon glyphicon-plus-sign"></span> 添加SKU属性</a>
		</div>
		<table class="table table-striped text-center">
			<thead>
				<tr>
					<th class="text-center">前台名称</th>
					<th class="text-center">后台名称</th>
					<th class="text-center">所属分类</th>
					<th class="text-center">操作</th>
				</tr>
			</thead>
			<tbody>
				@foreach (var skuProperty in Model)
				{
					<tr>
						<td>@skuProperty.FrontendName</td>
						<td>@skuProperty.BackendName</td>
						<td>@(skuProperty.Category == null ? "-" : skuProperty.Category.Name)</td>
						<td>
							<a href="@Url.Action("SKUProperty", "Service", new { id = skuProperty.Id })">编辑</a>
							&nbsp;&nbsp;
							<a href="@Url.Action("SKUPropertyValues", "Service", new { id = skuProperty.Id })">属性值列表</a>
						</td>
					</tr>
				}
			</tbody>
		</table>
	</div>
</div>

@section scripts {
	<script type="text/javascript">
		$(document).ready(function () {
			set_left_nav('#ln_SKUPropertyList');
		});
	</script>
}